import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
// 页面
import './common_dialog_test.dart';
import './overlay_test.dart';
import './flutter_picker_test.dart';

class DialogPageRouteMap {
  final String commonDialogTest = 'common_dialog_test';

  final String overlayTest = 'overlay_test';

  final String flutterPickerTest = 'flutter_picker_test';

  static void Function(FluroRouter) define = handleDefine;
}

void handleDefine(FluroRouter router) {
  DialogPageRouteMap routeMap = DialogPageRouteMap();

  router.define(
    routeMap.commonDialogTest,
    handler: Handler(
      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
        return CommonDialogTest();
      },
    ),
  );

  router.define(
    routeMap.overlayTest,
    handler: Handler(
      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
        return OverlayTest();
      },
    ),
  );

  router.define(
    routeMap.flutterPickerTest,
    handler: Handler(
      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
        return FlutterPickerTest();
      },
    ),
  );
}
